package com.etogc.groupchat.find;


import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.etogc.groupchat.R;
import com.etogc.groupchat.base.BaseFragment;
import com.etogc.view.recyclerView.YcRecyclerView;


public class FindFragment extends BaseFragment {

    private YcRecyclerView rvFind;
    private FindAdapter adapter;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View mView = inflater.inflate(R.layout.frgm_find, container, false);
        rvFind = mView.findViewById(R.id.rvFind);
        adapter = new FindAdapter(getActivity());
        rvFind.setAdapter(adapter);
        reqFindList();
        return mView;
    }

    private void reqFindList() {//请求
        FindHttpBiz.getFindList(getActivity(), adapter);
    }

//    wv = mView.findViewById(R.id.webView);
//        wv.loadUrl("http://h.7k7k.com/pc/");
//        wv.setWebViewClient(new WebViewClient() {
//        @Override
//        public boolean shouldOverrideUrlLoading(WebView view, String url) {
//            if (url.startsWith("tel:")) {
//                Intent intent = new Intent(Intent.ACTION_VIEW,
//                        Uri.parse(url));
//                startActivity(intent);
//                return true;
//            } else if (url.startsWith("baidumap://")) {
//                return true;
//            }
//            view.loadUrl(url);
//            return super.shouldOverrideUrlLoading(view, url);
//        }
//    });
//        wv.setOnKeyListener(new View.OnKeyListener() {
//
//        @Override
//        public boolean onKey(View v, int keyCode, KeyEvent event) {
//            if ((keyCode == KeyEvent.KEYCODE_BACK) && wv.canGoBack()) {
//                wv.goBack();
//                return true;
//            }
//            return false;
//        }
//
//    });
//        return mView;

}
